package com.bonuo.crm.mapper;

import com.bonuo.crm.domain.Project;
import com.bonuo.crm.domain.vo.CountAmount;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;
import java.util.List;

public interface ProjectMapper {
    List<Project> selectProjectList(Project project);

    Integer insertProject(Project project);

    Integer deleteProjectById(Integer id);

    Integer updateProject(Project project);

    Integer selectProjectByProjectName(String name);

    Integer selectProjectByContactIdAndMonth(Integer contactId);

    CountAmount selectAmount(@Param("ids") List<Integer> ids);

    BigDecimal selectAmountByUserId(@Param("userId") Integer userId, @Param("startDate") Date startDate, @Param("endDate")Date endDate);

    List<Project> selectProcessListByInvoice(Project project);

    BigDecimal selectAmountByProvince(@Param("collect") String collect, @Param("year") Integer year);

    String selectProjectByProjectNameOrNo(Project project);

    Integer selectProjectCollegeOrChange(@Param("userId") Integer userId, @Param("startDate") Date startDate, @Param("endDate") Date endDate, @Param("schedule") Integer schedule);

    BigDecimal selectAmountByNotBid(@Param("ids") List<Integer> ids);

    List<Project> selectWeeklyProjectList(Integer userId);

    BigDecimal selectAmountByStop(@Param("ids") List<Integer> ids);

    List<Integer> selectBNProjectIds();

    List<Integer> selectProjectListIds(@Param("project") Project project,@Param("bnProjectIds") List<Integer> bnProjectIds);

}
